package com.example.covid19.config;

import org.springframework.amqp.core.Binding;
import org.springframework.amqp.core.BindingBuilder;
import org.springframework.amqp.core.DirectExchange;
import org.springframework.amqp.core.Queue;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;


@Configuration
public class DirectRabbitConfig {

    @Bean
    public Queue CheeckDirectQueue() {
        return new Queue("gdd",true);
    }



    @Bean
    DirectExchange CheeckDirectExchange() {
        return new DirectExchange("gdd");
    }



    @Bean
    Binding bindJudgeDirect() {
        return BindingBuilder.bind(CheeckDirectQueue()).to(CheeckDirectExchange())
                .with("gddkey");
    }
}
